package com.hulk.hyena.framework.web.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Maps;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.context.annotation.Primary;

/**
 * Entity基类
 * 
 * @author hulk
 */
@ToString
public class BaseEntity implements Serializable
{

    private static final long serialVersionUID = 1L;



    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Getter
    @Setter
    private Date gmtCreate ;


    /** 归档时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Getter
    @Setter
    private Date gmtArchived;

    /** 归档标志*/
    @Getter
    @Setter
    private String isArchived;

    /** 最终更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Getter
    @Setter
    private Date gmtModified ;

    @Getter
    @Setter
    private String byCreate ;
    @Getter
    @Setter
    private String byModified ;
    @Getter
    @Setter
    private String byArchived ;

   /* 原记录编号*/
    @Getter
    @Setter
    private Long oriId ;

    /*  租户ID*/
    @Getter
    @Setter
    private String tenantId ;

   /* 乐观锁版本号*/
    @Getter
    @Setter
    private Long lockVersion ;

    @Getter
    @Setter
    /** 搜索值 */
    private String searchValue;
    @Getter
    @Setter
    /** 备注 */
    private String remark;

    /** 请求参数 */
    private Map<String, Object> params;


    public Map<String, Object> getParams()
    {
        if (params == null)
        {
            params = Maps.newHashMap();
        }
        return params;
    }

    public void setParams(Map<String, Object> params)
    {
        this.params = params;
    }
}
